#! /bin/bash
SCRIPT_BASE_DIR=$( dirname "${BASH_SOURCE[0]}" )
source "${SCRIPT_BASE_DIR}/common/fs_utils.sh"

function do_mount() {
    local dev="$1"
    local tgt="$2"
    if is_mount_point "${tgt}" 
    then
        echo "${tgt} is already mount point"
    else
        echo "To mount ${dev} to ${tgt}"
        sudo mount -t ext4 -o loop "${dev}" "${tgt}"
    fi
}

do_mount /home/ljs/work/apd-images/qemux86/core-image-apd-devel-qemux86.ext4 /mnt/devel
do_mount /home/ljs/work/apd-images/qemux86/core-image-apd-devel-radar-qemux86.ext4 /mnt/radar
do_mount /home/ljs/work/apd-images/qemux86/core-image-apd-devel-fusion-qemux86.ext4 /mnt/fusion

